package com.ctshk.rpc.order.custom.service;

import java.util.List;

import com.ctshk.common.dto.Result;
import com.ctshk.common.model.PageResponse;
import com.ctshk.common.model.TokenUser;
import com.ctshk.rpc.order.custom.dto.order.CustomOrderTouristCollectionDTO;
import com.ctshk.rpc.order.custom.dto.tourist.CustomGroupTouristInfoDTO;
import com.ctshk.rpc.order.custom.dto.tourist.CustomOrderTouristGroupDTO;
import com.ctshk.rpc.order.custom.dto.tourist.CustomOrderTouristInfoDTO;
import com.ctshk.rpc.order.custom.dto.tourist.CustomOrderTouristInfoDetailDTO;
import com.ctshk.rpc.order.custom.dto.tourist.CustomOrderTouristInfoListCollectionDTO;
import com.ctshk.rpc.order.custom.dto.tourist.CustomOrderTouristInfoPreviewInvoiceDTO;
import com.ctshk.rpc.order.custom.dto.tourist.CustomOrderTouristNameListDTO;
import com.ctshk.rpc.order.custom.dto.tourist.CustomOrderTouristRoomDTO;
import com.ctshk.rpc.order.custom.dto.tourist.CustomOrderTouristRoomGroupDTO;
import com.ctshk.rpc.order.custom.excel.ExcelData;
import com.ctshk.rpc.order.custom.req.order.CustomOrderIdReq;
import com.ctshk.rpc.order.custom.req.schedule.TripScheduleInfoReq;
import com.ctshk.rpc.order.custom.req.tourist.*;
import com.ctshk.rpc.order.custom.vo.ExcelTemp;

/**
 * <p>
 * 游客信息 服务类
 * </p>
 *
 * @author 叶冠峰
 * @since 2021-02-22
 */
public interface ICustomizedOrderTouristInfoService {

    /**
     * 旅客信息列表
     * @param req
     * @return
     */
    PageResponse<CustomOrderTouristInfoDTO> list(CustomOrderIdReq req);

    /**
     * 编辑旅客信息
     * @param req
     * @return
     */
    Result edit(CustomOrderTouristInfoEditReq req);

    /**
     * 收款列表
     * @param req
     * @return
     */
    PageResponse<CustomOrderTouristInfoListCollectionDTO> listCollection(CustomOrderIdReq req);

    /**
     * 团期详情 - 收款明细
     * @param req
     * @return
     */
    List<CustomOrderTouristInfoListCollectionDTO> reciveListBySchedule(TripScheduleInfoReq req);


    /**
     * 旅客详情
     * @param req
     * @return
     */
    Result<CustomOrderTouristInfoDetailDTO> detail(CustomOrderTouristIdReq req);

    /**
     * 删除旅客
     * @param req
     * @return
     */
    Result delete(CustomOrderTouristIdReq req);

    /**
     * 添加旅客
     * @param req
     * @return
     */
    Result add(CustomOrderTouristInfoAddReq req);

    /**
     * 打印發票预览
     * @param req
     * @param currentUser
     * @return
     */
    Result<CustomOrderTouristInfoPreviewInvoiceDTO> previewInvoice(CustomOrderTouristInfoPreviewInvoiceReq req, TokenUser currentUser);

    /**
     * 校验是否可添加
     * @param req
     * @return
     */
    Result<Boolean> checkAdd(TouristInfoCheckAddReq req);

    /**
     * 收款明细
     * @param req
     * @return
     */
    List<CustomOrderTouristCollectionDTO> reciveList(CustomOrderTouristIdReq req);

    /**
     * 清空订单旅客信息
     * @param orderId
     * @param userId
     * @return
     */
    boolean cleanByOrder(Long orderId, Long userId);

    /**
     * 旅客名单 - show/noShow切换
     * @param req
     * @return
     */
    Result noShow(CustomOrderTouristNoShowReq req);

    /**
     * 旅客名单 - 锁定状态切换
     * @param req
     * @return
     */
    Result changeLock(CustomOrderTouristNoShowReq req);

    /**
     * 旅客名单 - 登记
     * @param req
     * @return
     */
    Result checkIn(CustomOrderTouristCheckInReq req);

    /**
     * 旅客名单 - 送签
     * @param req
     * @return
     */
    Result sendVisa(CustomOrderTouristSendVisaReq req);

    /**
     * 旅客名单 - 出签成功
     * @param req
     * @return
     */
    Result signOutSuccess(CustomOrderTouristSignOutSuccessReq req);

    /**
     * 旅客名单 - 出签失败
     * @param req
     * @return
     */
 //   Result signOutFail(CustomOrderTouristSignOutSuccessReq req);
    
    /**
     * 旅客名单
     */
    PageResponse<CustomOrderTouristNameListDTO> nameList(CustomOrderTouristNameListReq touristNameListReq);
    
    /**
     * 旅客分组分房查询
     */
    PageResponse<CustomOrderTouristRoomGroupDTO> queryList(CustomOrderTouristRoomReq roomReq);
    
    /**
     * 旅客分房查询
     * @param roomReq
     * @return
     */
    List<CustomOrderTouristRoomDTO> roomList(CustomOrderTouristRoomReq roomReq);
    
    /**
     * 旅客分组
     */
    Result group(CustomRoomGroupReq roomGroupReq);
    
    /**
     * 旅客分房
     */
    Result updateRoom(CustomRoomRoomReq roomReq,Long userId);
    
    /**
     * 获取团信息
     * @param id
     * @return
     */
    CustomGroupTouristInfoDTO groupInfo(Long id);
    
    /**
     * 根据团期id查询组信息
     *
     * @param id 团期id
     * @return 组信息
     */
    Result<List<CustomOrderTouristGroupDTO>> queryGroup(Long id);
    
    /**
     * 新增游客分组
     *
     * @param scheduleId 团期id
     * @return 返回值
     */
    Result addGroup(Long scheduleId,Long userId);

    /**
     * 旅客名单-导出分组
     * @param req
     * @return
     */
    ExcelData exportGroup(TripScheduleInfoReq req);

    /**
     * 旅客名单-导出分房
     * @param req
     * @return
     */
    ExcelData exportRoom(TripScheduleInfoReq req);

    /**
     * 旅客名单-导出名单
     * @param req
     * @return
     */
    ExcelData exportTourist(TripScheduleInfoReq req);

    /**
     * 获取国籍ID
     * @param nation
     * @return
     */
    Long getNationId(String nation);

    /**
     * 获取证件类型ID
     * @param stringCellValue
     * @return
     */
    Long getCertificateTypeId(String stringCellValue);

    /**
     * 导入旅客名单
     * @param tempList
     * @param userId
     * @param orderId
     * @return
     */
    Result exportIn(List<ExcelTemp> tempList, Long userId, Long orderId);

    /**
     * 导出旅客模板
     * @param req
     * @return
     */
    ExcelData exportOut(CustomOrderIdReq req);

}
